#include <iostream>
#include <cstring>
using namespace std;
int main() {
	long n, t = 0;
	cin >> n;
	if (n == 0) {
		cout << 0;
	} 
	if (n > 0) {
		for (int i = 1; i > 0; i++) {
			t = t * 10 + n % 10;
			n -= n % 10;
			if (n > 0) {
				n = n / 10;
			} else {
				break;
			}
		}
	} else {
		n = n * -1;
		for (int i = 1; i > 0; i++) {
			t = t * 10 + n % 10;
			n -= n % 10;
			if (n > 0) {
				n = n / 10;
			} else {
				break;
			}
		}
		t = t * -1;
	}
	cout << t << endl;
	return 0;
}
